package fz.vrd.app.fragment;

import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import fz.vrd.app.R;
import fz.vrd.library.page.fragment.BaseFragment;
import fz.vrd.library.page.fragment.BaseFrg;

public class Fragment1 extends BaseFragment {


    @Override
    protected int getLayoutId() {
        return R.layout.frg_1;
    }

    @Override
    protected void init() {
        TextView tv = findViewById(R.id.textView);
        tv.setText("Fragment1");

        findViewById(R.id.btn_back).setOnClickListener(v -> {
            backPage();
        });

        Button btn_tab = findViewById(R.id.btn_tab);
        btn_tab.setVisibility(View.VISIBLE);
        btn_tab.setOnClickListener(v -> {
            ((FragmentAc) getActivity()).addFrg(new NestFragment());
        });

        findViewById(R.id.btn_next).setOnClickListener(v -> {
            ((FragmentAc) getActivity()).addFrg(new Fragment2());
        });
    }
}
